﻿using ProjectFootball.MVC.Foundation.ResourceLibrary;
using System;
using System.ComponentModel.DataAnnotations;

namespace ProjectFootball.MVC.Areas.PersonArea.Models
{
    public class PersonDataModel
    {
        public PersonDataModel()
        {
            Dob = DateTime.Today.AddYears(-20);
            ActiveFrom = DateTime.Today;
            ActiveTo = _DateTime.HighDate;
        }

        public Guid PersonGuid { get; set; }

        public Guid ApprovalGuid { get; set; }

        public string Forenames { get; set; }

        [Required]
        [StringLength(30, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 2)]
        public string Surname { get; set; }

        [Display(Name = "Date of birth")]
        [DataType(DataType.Date)]
        public DateTime? Dob { get; set; }

        [UIHint("DropDown/Country")]
        [Required]
        [Display(Name = "Nationality")]
        public Guid? CountryGuid { get; set; }

        [Required]
        [Display(Name = "Active from")]
        [DataType(DataType.Date)]
        public DateTime ActiveFrom { get; set; }

        [Required]
        [Display(Name = "Active to")]
        [DataType(DataType.Date)]
        public DateTime ActiveTo { get; set; }
    }
}